package com.xiyu.service.model.elder.register;

import com.xiyu.service.model.base.BaseEntity;
import com.xiyu.service.model.elder.info.ElderInfo;
import com.xiyu.service.model.nurse.plan.NursePlan;
import com.xiyu.service.model.restaurant.recipe.RestaurantCombo;
import com.xiyu.service.model.bed.bed.BedInfo;
import org.babyfish.jimmer.sql.*;
import java.time.LocalDateTime;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.math.BigDecimal;

@Entity
public interface ElderCheckIn extends BaseEntity {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    long id();

    @Key
    String checkInNo();

    @IdView
    @Nullable
    Long elderId();

    @ManyToOne
    @Nullable
    ElderInfo elder();

    @IdView
    @Nullable
    Long nursePlanId();

    @ManyToOne
    @Nullable
    NursePlan nursePlan();

    @IdView
    @Nullable
    Long restaurantComboId();

    @ManyToOne
    @Nullable
    RestaurantCombo restaurantCombo();

    @IdView
    @Nullable
    Long bedInfoId();

    @ManyToOne
    @Nullable
    BedInfo bedInfo();

    LocalDateTime beginTime();

    LocalDateTime endTime();

    BigDecimal checkInFee();

    BigDecimal reductionFee();

    Integer status();

    Integer payType();

    @Nullable
    @LogicalDeleted("now")
    LocalDateTime deletedTime();

    @OneToMany(mappedBy = "checkIn")
    List<ElderCheckInFee> fees();

}